package com.ruoyi.purchase.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName po_brand
 */
@TableName(value ="po_brand")
@Data
public class PoBrand implements Serializable {
    /**
     * 品牌编号 自增
     */
    @TableId(type = IdType.AUTO)
    private Integer brandId;

    /**
     * 品牌名称
     */
    private String brandName;

    /**
     * 商品状态(0:不可用；1:可用)
     */
    private String status;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private Integer sysCreateUserId;

    /**
     * 创建人姓名
     */
    @TableField(exist = false)
    private String createUsername;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PoBrand other = (PoBrand) that;
        return (this.getBrandId() == null ? other.getBrandId() == null : this.getBrandId().equals(other.getBrandId()))
            && (this.getBrandName() == null ? other.getBrandName() == null : this.getBrandName().equals(other.getBrandName()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getSysCreateUserId() == null ? other.getSysCreateUserId() == null : this.getSysCreateUserId().equals(other.getSysCreateUserId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getBrandId() == null) ? 0 : getBrandId().hashCode());
        result = prime * result + ((getBrandName() == null) ? 0 : getBrandName().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getSysCreateUserId() == null) ? 0 : getSysCreateUserId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "PoBrand{" +
                "brandId=" + brandId +
                ", brandName='" + brandName + '\'' +
                ", status='" + status + '\'' +
                ", createTime=" + createTime +
                ", sysCreateUserId=" + sysCreateUserId +
                ", createUsername='" + createUsername + '\'' +
                '}';
    }
}